package bp.ccfast.rpt;

import bp.da.*;
import bp.en.*;
import bp.en.Map;
import bp.ccfast.ccmenu.*;

/** 
 三维报表
*/
public class Rpt3D extends EntityNoName
{

		///#region 属性
	@Override
	public UAC getHisUAC()
	{
		UAC uac = new UAC();
		if (bp.web.WebUser.getIsAdmin() == true)
		{
			uac.IsDelete = true;
			uac.IsUpdate = true;
			uac.IsInsert = false;
			return uac;
		}
		else
		{
			uac.Readonly();
		}
		return uac;
	}

		///#endregion


		///#region 构造方法
	/** 
	 三维报表
	*/
	public Rpt3D()
	{
	}
	@Override
	protected boolean beforeDelete() throws Exception
	{
		return super.beforeDelete();
	}
	/** 
	 EnMap
	*/
	@Override
	public Map getEnMap()
	{
		if (this.get_enMap() != null)
		{
			return this.get_enMap();
		}

		Map map = new Map("Sys_Rpt", "三维报表"); // 类的基本属性.
		map.setEnType(EnType.Sys);

		map.AddTBStringPK(MenuAttr.No, null, "编号", false, false, 1, 90, 50);
		map.AddTBString(MenuAttr.Name, null, "菜单名称", true, false, 0, 200, 200);
		map.AddTBString("RptType", null, "报表类型", false, false, 0, 200, 200);
		map.AddDDLSysEnum("ListModel", 0, "维度显示格式", true, true, "RptModel", "@0=左边@1=顶部");
		map.AddDDLSysEnum("SumPos", 0, "合计位置", true, true, "Rpt3SumModel", "@0=不显示@1=底部@2=头部");
		map.AddTBString("RefPKey", null, "一维二维关联字段", false, false, 0, 100, 100);
		map.AddTBString("RowValKey", null, "分析字段", false, false, 0, 100, 100);
		
		map.AddGroupAttr("数据源");
		map.AddTBString("DBSrc", "local", "数据源",true, false, 0, 500, 100,false);
		map.AddTBStringDoc("Docs", null, "内容数据源", true, false, true);
		map.AddTBString("Tag1", null, "维度1名称", true, false, 0, 500, 100, true);
		map.AddTBStringDoc("Tag2", null, "维度1数据源", true, false, true);
		map.AddTBString("D1Key", null, "维度1字段名称", true, false, 0, 50, 20, true);

		map.AddTBString("Tag3", null, "维度2名称", true, false, 0, 500, 100, true);
		map.AddTBStringDoc("Tag4", null, "维度2数据源", true, false, true);
		map.AddTBString("D2Key", null, "维度2字段名称", true, false, 0, 50, 20, true);

		map.AddTBString("Tag5", null, "维度3名称", true, false, 0, 500, 100, true);
		map.AddTBStringDoc("Tag6", null, "维度3数据源", true, false, true);
		map.AddTBString("D3Key", null, "维度3字段名称", true, false, 0, 50, 20, true);

		//从表明细.

		this.set_enMap(map);
		return this.get_enMap();
	}



	@Override
	protected boolean beforeUpdateInsertAction() throws Exception
	{
		return super.beforeUpdateInsertAction();
	}
}
